package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OaTicketSupplementMapper;
import com.ruoyi.system.domain.OaTicketSupplement;
import com.ruoyi.system.service.IOaTicketSupplementService;

/**
 * 补票Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class OaTicketSupplementServiceImpl implements IOaTicketSupplementService 
{
    @Autowired
    private OaTicketSupplementMapper oaTicketSupplementMapper;

    /**
     * 查询补票
     * 
     * @param id 补票主键
     * @return 补票
     */
    @Override
    public OaTicketSupplement selectOaTicketSupplementById(Long id)
    {
        return oaTicketSupplementMapper.selectOaTicketSupplementById(id);
    }

    /**
     * 查询补票列表
     * 
     * @param oaTicketSupplement 补票
     * @return 补票
     */
    @Override
    public List<OaTicketSupplement> selectOaTicketSupplementList(OaTicketSupplement oaTicketSupplement)
    {
        return oaTicketSupplementMapper.selectOaTicketSupplementList(oaTicketSupplement);
    }

    /**
     * 新增补票
     * 
     * @param oaTicketSupplement 补票
     * @return 结果
     */
    @Override
    public int insertOaTicketSupplement(OaTicketSupplement oaTicketSupplement)
    {
        oaTicketSupplement.setCreateTime(DateUtils.getNowDate());
        return oaTicketSupplementMapper.insertOaTicketSupplement(oaTicketSupplement);
    }

    /**
     * 修改补票
     * 
     * @param oaTicketSupplement 补票
     * @return 结果
     */
    @Override
    public int updateOaTicketSupplement(OaTicketSupplement oaTicketSupplement)
    {
        oaTicketSupplement.setUpdateTime(DateUtils.getNowDate());
        return oaTicketSupplementMapper.updateOaTicketSupplement(oaTicketSupplement);
    }

    /**
     * 批量删除补票
     * 
     * @param ids 需要删除的补票主键
     * @return 结果
     */
    @Override
    public int deleteOaTicketSupplementByIds(Long[] ids)
    {
        return oaTicketSupplementMapper.deleteOaTicketSupplementByIds(ids);
    }

    /**
     * 删除补票信息
     * 
     * @param id 补票主键
     * @return 结果
     */
    @Override
    public int deleteOaTicketSupplementById(Long id)
    {
        return oaTicketSupplementMapper.deleteOaTicketSupplementById(id);
    }
}
